<?php
/**
 *  💡 免责声明：本软件不得用于商业用途，仅做学习交流
 *  ⚠️ 权利声明：本软件由版权人提供产品技术支持
 *  📅 项目编号：NX2025-0135
 */
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateBeanPackagesTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up()
    {
        Schema::create('bean_packages', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('礼包名称');
            $table->decimal('total_amount', 16, 2)->comment('总KC通证数');
            $table->integer('total_days')->default(100)->comment('释放总天数');
            $table->integer('stock')->comment('库存数量');
            $table->timestamp('start_at')->nullable()->comment('开始销售时间');
            $table->timestamp('end_at')->nullable()->comment('结束销售时间');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down()
    {
        Schema::dropIfExists('bean_packages');
    }
}
